package com.takeeasy.platform.util;

import java.io.File;

public class FileUtil {
	public static String FILE_SEPARATOR = File.separator;

	public static String getClassRootPath() {
		return FileUtil.class.getClassLoader().getResource("").getPath();
	}

	public static String getLibPath() {
		return getWebInfPath() + FILE_SEPARATOR + "lib";
	}

	public static String getWebInfPath() {
		String classPath = getClassRootPath();
		int classesIndex = classPath.indexOf("classes");
		String webInfPath = classPath.substring(0, classesIndex);
		return webInfPath;
	}
	
	public static void main(String[] args) {
		System.out.println(FileUtil.getLibPath());
	}
}
